<?php
/**
 * Created by PhpStorm.
 * User: xuke
 * Date: 16/5/20
 * Time: 下午2:22
 */
namespace App\Http\Model;

class Users extends Base
{
    protected $primaryKey = 'user_id';

    protected $fillable = [
        'username',
    ];

    protected $hidden = [
        'password',
        'api_token',
        'remember_token',
    ];

    public $timestamps = false;

    public function userCart()
    {
        return $this->hasMany(UserCart::class, 'user_id', 'user_id');
    }

    public function orders()
    {
        return $this->hasMany(Order::class, 'user_id', 'user_id');
    }
}